
#include "RuisDll.h"

namespace cliCore {
	RuisDll::RuisDll(LPCSTR file) {
		hDll = NULL;
		mFile = file;
	}
	RuisDll::~RuisDll() {
		if (hDll != NULL) {
			FreeLibrary(hDll);
		}
	}
	bool RuisDll::init() {
		hDll = LoadLibrary(mFile.GetData());
		if (hDll == NULL)return false;
		//if (hDll <= 32)return false;
		return true;
	}

	FARPROC RuisDll::getFun(LPCSTR name) {
		return GetProcAddress(hDll, name);
	}
}